﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Core
{
    public static partial class contest
    {
        public static dynamic showContestProblem(int cid, char ps,out Sql.ContestProblemStatistics cps,bool god)
        {
            var sql = new Sql.SqlDataContext();
            var p = sql.ContestProblem.FirstOrDefault(row => row.cid == cid && row.ps == ps && (god || !row.disabled));
            cps = sql.ContestProblemStatistics.FirstOrDefault(row => row.cid == cid && row.ps == ps);
            return p;
        }
    }
}
